﻿using BusinessLogicLayer;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PresentationLayer
{
    public partial class InTheDGForm : Form
    {
        public List<DocGia> DSDG { get; set; }
        public InTheDGForm()
        {
            InitializeComponent();
        }

        private void InTheDGForm_Load(object sender, EventArgs e)
        {
            DocGiaBindingSource.DataSource = DSDG;
            this.rvInTheDG.RefreshReport();
            this.rvInTheDG.PrintingBegin += rvInTheDG_PrintingBegin;
            
        }

        void rvInTheDG_PrintingBegin(object sender, Microsoft.Reporting.WinForms.ReportPrintEventArgs e)
        {
            foreach (var item in DSDG)
            {
                new DocGiaManager().CapNhatDGTheoTT(item.MaDocGia, "Hoạt động");
            }
        }
    }
}
